package com.campus.web;

import com.campus.dto.SampleDto;
import com.campus.web.vo.ResponseResult;
import org.springframework.web.bind.annotation.*;

import static com.campus.common.BusinessConstants.API_BASE;

/**
 * @desc: 注意：该控制器为 参考样本，实际实现中可以删除本类。
 * @author: Ping
 * @date: 2024/11/1 9:35
 */

@RestController
@RequestMapping(API_BASE + "/sample")
public class SampleController {

    @GetMapping("/hello")
    public ResponseResult<String> hello() {
        return ResponseResult.ok("hello world");
    }

    @PostMapping("/hello/sample")
    public ResponseResult<String> hello(@RequestBody SampleDto sampleDto) {
        return ResponseResult.ok("hello sample");
    }
}
